#pragma once

#include "ScriptCompiler/AST/ASTNode.h"

class CAccessLevelNode;
class CDecoratorNode;
class CTypeNode;
class CParameterNode;
class CSentenceBlockNode;
class CExpressionNode;

class COperatorFunctionNode : public CASTNode
{
public:
    COperatorFunctionNode(std::weak_ptr<CScriptFileContext> InFile)
        : CASTNode(InFile,EASTNodeType::OperatorFunction)
    {
    }

    //name 
    TOptional<std::shared_ptr<CAccessLevelNode>> AccessLevel;
    
    TOptional<std::shared_ptr<CDecoratorNode>> Decorator;

    std::shared_ptr<CTypeNode> ReturnType;
    
    std::shared_ptr<CScriptToken> OperatorKeyword;

    std::shared_ptr<CScriptToken> Operator;

    TVector<std::shared_ptr<CParameterNode>> Parameters;

    TOptional<std::shared_ptr<CSentenceBlockNode>> Content;

    TOptional<std::shared_ptr<CExpressionNode>>  LambdaContent;

    virtual void DebugPrint(int32_t InDepth) override;
    
    virtual std::shared_ptr<CScriptToken> GetFirstToken() override;


};